package frontend.components.other;

import backend.model.base.DBModel;
import org.apache.wicket.markup.html.form.IChoiceRenderer;

public class DBModelChoiceRenderer<DBM extends DBModel> implements IChoiceRenderer<DBM> {
    @Override
    public Object getDisplayValue(DBM dbm) {
        return dbm.getDisplayLabel();
    }

    @Override
    public String getIdValue(DBM dbm, int index) {
        return String.valueOf(dbm.getId());
    }
}
